<template>
	<view class="container">
		<view class="list-box">
			<view class="list-item-box" v-for="(item,index) in dataList" :key="index" @tap="goDetail(item.enrollProfileId)">
				<view class="list-item-label">{{item.universityName}}{{item.enrollProfileYear}}招生简章</view>
				<view class="list-item-arrow">
					<image src="../../static/images/more.png"></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		http,
		showToastMsg
	} from '../../utils'

	export default {
		data() {
			return {
				dataList: [],
				reqData: {
					id: 0
				}
			}
		},

		onLoad(options) {
			this.reqData.id = options.id
			this.fetchData()
		},

		methods: {
			
			fetchData() {
				const that = this
				http('/enroll-profile/list', that.reqData).then(res => {
					if (res.code == 20000) {
						that.dataList = res.data
					}
				})
			},

			goDetail(id) {
				uni.navigateTo({
					url: '/pages/enrollment_introduction_detail/enrollment_introduction_detail?id=' + id
				})
			}

		}
	}
</script>

<style>
	page {
		background-color: #f5f5f5;
	}

	.container {
		width: 750rpx;
		height: auto;
	}

	.list-box {
		background-color: #ffffff;
		width: 750rpx;
		height: auto;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		margin-top: 20rpx;
		font-size: 28rpx;
	}

	.list-item-box {
		width: 690rpx;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		height: 90rpx;
		border-bottom: solid 1rpx #f5f5f5;
	}

	.list-item-arrow image {
		width: 20rpx;
		height: 20rpx;
	}

	.noHave {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		color: #ccc;
		font-size: 32rpx;
		height: 48rpx;
	}
</style>
